package operation;

import book.Book;
import book.BookList;

import java.util.Scanner;

public class DelOperation implements IOPeration{
    @Override
    public void work(BookList bookList) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入图书名：");
        String name = scanner.nextLine();
        if (!bookList.books.remove(name)){
            System.out.println("没有找到您要删除的图书！！");
            return;
        }

        System.out.println("删除成功！！");
        return;
    }
}
